import * as THREE from "three";
export default class LocationHelper{

}
LocationHelper.lglt2xyz=function (lng, lat, radius) {
  const theta = (90 + lng) * (Math.PI / 180)

  const phi = (90 - lat) * (Math.PI / 180)
  return (new THREE.Vector3()).setFromSpherical(new THREE.Spherical(radius, phi, theta))
}
LocationHelper.lglt2xyzByArr=function (lngLat, radius) {
  const theta = (90 + lngLat[0]) * (Math.PI / 180)

  const phi = (90 - lngLat[1]) * (Math.PI / 180)
  return (new THREE.Vector3()).setFromSpherical(new THREE.Spherical(radius, phi, theta))
}
